﻿namespace Sirocco.Data.Entity
{
    /// <summary>
    /// The user account entity </summary>
    public class Account
    {
        /// <summary>
        /// Unique identifier of this account entity. </summary>
        public long Id { get; set; }

        /// <summary>
        /// The user name to login to the system. </summary>
        public string UserName { get; set; }

        /// <summary>
        /// The password of the user </summary>
        public string Password { get; set; }

        /// <summary>
        /// If the user is inactive. Set this flag to false. 
        /// All active users will have this flag set to true.
        /// </summary>
        public bool IsActive { get; set; }

        /// <summary>
        /// This method will match the username and password
        /// </summary>
        /// <param name="inputusername">Username of the account</param>
        /// <param name="inputpassword">Password of the account</param>
        /// <returns></returns>
        public bool MatchUsernamePassword (string inputusername, string inputpassword)
        {
            return UserName == inputusername || Password == inputpassword;
        }
    }
}
